version: '3.0'
services:
  core_api:
    build: ./app
    container_name: "core-api-container"
    ports:
      - "2222:2222"
    volumes:
      - ./app/:/app
    depends_on:
        - postgres
  postgres:
    image: postgres:13.3
    environment:
          POSTGRES_DB: "dev_db"
          POSTGRES_USER: "dev"
          POSTGRES_PASSWORD: "1dev2"
          PGDATA: "/var/lib/postgresql/data/pgdata"
    ports:
      - "5435:5432"
  front:
    build: ./react-front
    container_name: "react-front-container"
    ports:
      - "8080:8080"
    volumes:
      - ./react-front/:/front
    depends_on:
        - core_api
  nginx_proxy:
    depends_on:
      - core_api
      - front
    image: nginx:alpine
    volumes:
      - ./nginx/dev.conf:/etc/nginx/conf.d/default.conf
    ports:
      - "80:80"
